/*
 * @Author: plus666
 * @Date: 2022-06-06 15:47:46
 * @LastEditors: plus666
 * @LastEditTime: 2022-06-06 15:56:02
 * @FilePath: \looking_for_money\store\modules\user.js
 */
export default {
  namespaced: true,
  state: {
    userInfo: {
      user_avatar:
        '//y.gtimg.cn/music/photo_new/T002R300x300M000002s07lT3Hefdq_1.jpg?max_age=2592000',
      user_name: '测试用户00'
    },
    // 是否存在用户信息
    userInfoBol: false
  },
  actions: {
    /**
     * @description 设置颜色
     * @param {Object} context
     * @param {String} color 尺寸
     */
  },
  mutations: {
    /**
     * @description 将 vuex 中的主题颜色设置应用到系统中
     * @param {Object} context
     * @param {Object} payload oldColor {String} 旧的颜色
     * @param {Object} payload newColor {String} 新颜色
     */
    setUserInfo (state, nextObj) {
      state.userInfo = nextObj
    },
    setUserInfoBol (state, bol) {
      state.userInfoBol = bol
    }
  }
}
